

IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[spPayIns_UpdatePayIn]') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
	DROP PROCEDURE [dbo].[spPayIns_UpdatePayIn]
GO

GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		Eric Liew
-- Create date: 6/2/2009
-- Description:	Update a Owner
-- =============================================
CREATE PROCEDURE [dbo].[spPayIns_UpdatePayIn]
(
	@PayInId INT,
	@PayInDate DATETIME,
	@ShiftId Int,
	@ScheduleDriverTaxiId Int,
	@TaxiId Int,
	@DriverId Int,
	@Cash decimal,
	@M7 decimal,
	@EftPos decimal,
	@Expenses decimal,
	@Comment varchar(500),
	@CarriedFwdPayIn decimal,
	@Claims decimal

)
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON

	UPDATE PayIn
	SET
		PayInDate = @PayInDate,
		ShiftId = @ShiftId,
		ScheduleDriverTaxiId = @ScheduleDriverTaxiId,
		TaxiId = @TaxiId,
		DriverId = @DriverId,
		Cash = @Cash,
		M7 = @M7,
		EftPos = @EftPos,
		Expenses = @Expenses,
		Comment = @Comment,
		CarriedFwdPayIn = @CarriedFwdPayIn,
		Claims = @Claims
	WHERE
		PayInId = @PayInId    
 
END
GO
